﻿<%@ Page Title="家乐福——评选宝宝" Language="C#" MasterPageFile="~/MasterPageTwoCol.master"
    AutoEventWireup="true" CodeBehind="BabyList_old.aspx.cs" Inherits="WebSite.BabyList_old" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        .orderarea
        {
            display: inline-block;
            background: url(images/babylist/buttonarea.png) no-repeat;
            width: 380px;
            height: 30px;
        }
        .orderarea ul li
        {
            float: left;
            height: 29px;
        }
        .orderarea ul a
        {
            line-height: 29px;
            height: 29px;
            text-decoration: none;
            padding: 0px 55px;
        }
        
        .orderarea ul li.cur
        {
            background: url(images/babylist/buttonarea_selected.png) no-repeat;
        }
        
        div.photolist div.photoitem
        {
            display: inline-block;
            width: 330px;
            min-height: 50px;
            text-align: center;
            margin-bottom: 20px; /*margin-right: 2px;*/
            margin-right: 5px;
            float: left;
        }
        
        div.photolist div.photoitem div.textpart
        {
            height: 70px;
            vertical-align: middle;
        }
        div.photolist div.photoitem div.textpart .part1
        {
            display: inline-block;
            width: 160px;
            text-align: center;
            float: left;
        }
        
        div.photolist div.photoitem div.textpart .part2
        {
            display: inline-block;
            width: 160px;
            text-align: left;
            float: right;
        }
        
        div.photolist div.photoitem .sinaicon
        {
            vertical-align: top;
            display: inline-block;
            background: url(images/sina_icon.png) no-repeat;
            text-indent: 2em;
        }
    </style>
    <script src="js/baby.js" type="text/javascript"></script>
    <script>
        function querybaby()
        {
            window.location = "/BabyList.aspx?query=" + $('.SearchTextBox').val();
        }

        function onenterkey()
        {
            if (event.keyCode == 13)
            {
                querybaby();
                return false;
            }
            else
            {
                return true;
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="InfoRow">
        <div style="float: left; display: inline-block; width: 40px; padding: 5px;">
            搜索</div>
        <div style="float: left; display: inline-block;">
            <input type="text" style="width: 500px" class="SearchTextBox" value="<%=  Request["query"] %>" onkeydown="return onenterkey(); " /></div>
        <div style="float: right; display: inline-block">
            <a href="javascript:void(0)" onclick="querybaby();">
                <div class="TextButton" style="width: 77px; background-image: url(images/babylist/button1.png)">
                    搜索
                </div>
            </a>
        </div>
        <div class="clearfloat">
        </div>
    </div>
    <div class="InfoRow">
        <div style="float:left; width: 40px; padding: 5px; display:inline-block">排序</div>
        <div style="float:left; display:inline-block;">
            <div class="orderarea">
            <ul>
                <li class="<%= Request["ordertype"] != "2" ? "cur" : "" %>"><a class="ft_14 brown"
                    href="/BabyList.aspx?ordertype=1&query=<%= Request["query"] %>">按上传时间</a></li>
                <li class="<%= Request["ordertype"] == "2" ? "cur" : "" %>"><a class="ft_14 brown"
                    href="/BabyList.aspx?ordertype=2&query=<%= Request["query"] %>">按网友投票</a></li>
            </ul>
        </div>
        </div>
        <div class="clearfloat"></div>
        
    </div>
    <div class="photolist">
        <% 
            if (TeamListData != null)
            {
                foreach (var item in TeamListData)
                {   
        %>
        <div class="photoitem">
            <div>
                <%--<%=item.TeamHeadImg %>--%>
                <a href="/ViewBabyGroup.aspx?teamid=<%= item.Id %>"><img class="imgteam_medium wbshare" src="<%= item.TeamHeadImg %>" alt="team photo" /></a>
            </div>
            <div class="textpart">
                <div class="part1">
                    <p>
                        &nbsp;</p>
                    <p class="yahei green2">
                        <%=item.TeamName%></p>
                    <p class="yahei orange2">
                        <%=item.BabyAName %>
                        /
                        <%=item.BabyBName%></p>
                </div>
                <div class="part2">
                    <p>
                        &nbsp;</p>
                    <p class="yahei green2 ft_26">
                        票数：<span id="piaoshu_<%=item.Id %>" class="orange2 piaoshu"><%=item.TeamVoteNum %></span></p>
                </div>
                <div class="clearfloat">
                </div>
            </div>
            <table border="0" style="width: 100%">
                <tr>
                    <td align="center">
                        <a href="ViewBabyGroup.aspx?teamid=<%=item.Id%>">
                            <img src="images/BabyList/quqiuqiu.png" /></a>
                    </td>
                    <!--<td>
                        <a href="javascript:void(0)" onclick="voteTeam(<%=item.Id%>,$('#piaoshu_<%=item.Id %>'))">
                            <img src="images/BabyList/geiwomentoupiao.png" /></a>
                    </td>-->
                </tr>
            </table>
        </div>
        <%
                }
            }
        %>
        <div class="clearfloat">
        </div>
    </div>
    <div class="pager" style="text-align: center;">
        <%
            System.Collections.Generic.Dictionary<string, string> pp = new System.Collections.Generic.Dictionary<string, string>();
            //pp.Add("areaid", areaId);
            //pp.Add("groupId", groupId);
            //pp.Add("race", race);
            //pp.Add("rolename", roleName);   
            pp.Add( "ordertype", Request["ordertype"] );
            pp.Add( "query", Request["query"] );
        %>
        <%=Shanda.Utility.Common.PaginationHelper.DoPagination(PageIndex, PageSize, RowTotal, Request.ApplicationPath.TrimEnd('/') + "/BabyList.aspx", pp, false)%>
        <div class="clearfloat">
        </div>
    </div>
    <div style="margin-bottom: 20px;">
    </div>
</asp:Content>
